import org.rsbot.script.methods.Calculations;
import org.rsbot.script.methods.Camera;
import org.rsbot.script.methods.Objects;
import org.rsbot.script.methods.Walking;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPath;

public abstract class AionAirCrafter$ObjectAction extends AionAirCrafter.Action
{
  private String action;
  private int id;

  public AionAirCrafter$ObjectAction(AionAirCrafter paramAionAirCrafter, String paramString, int paramInt)
  {
    this.action = paramString;
    this.id = paramInt;
  }

  public String getDesc() {
    return "Interacting with object.";
  }

  public void process() {
    RSObject localRSObject = AionAirCrafter.access$1900(this.this$0).getNearest(new int[] { this.id });
    if (localRSObject != null)
      if (localRSObject.isOnScreen()) {
        localRSObject.doAction(this.action);
        if (AionAirCrafter.access$2000(this.this$0).distanceTo(localRSObject) > 1)
          AionAirCrafter.access$1400(this.this$0, this.this$0.random(600, 900));
      }
      else {
        AionAirCrafter.access$2100(this.this$0).turnToObject(localRSObject);
        if (!localRSObject.isOnScreen())
          AionAirCrafter.access$2200(this.this$0).getPath(localRSObject.getLocation()).traverse();
      }
  }
}